package com.campus.backend.bean.notice;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 创建公告Bean
 *
 * @author campus
 * @since 2025-01-15
 */
@Data
@ApiModel(value = "创建公告Bean", description = "创建公告Bean")
public class CreateNoticeBean {

    @ApiModelProperty(value = "公告标题", required = true)
    @NotBlank(message = "公告标题不能为空")
    private String title;

    @ApiModelProperty(value = "公告内容", required = true)
    @NotBlank(message = "公告内容不能为空")
    private String content;

    @ApiModelProperty(value = "目标类型：0-全部端，1-顾客端，2-商家端，3-配送端", required = true)
    @NotNull(message = "目标类型不能为空")
    private Integer targetType;

    @ApiModelProperty(value = "优先级：0-普通，1-重要，2-紧急")
    private Integer priority;

    @ApiModelProperty(value = "状态：0-禁用，1-启用")
    private Integer status;

    @ApiModelProperty(value = "开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "是否置顶：0-否，1-是")
    private Integer isTop;
}